package com.ocom.xcxapi.client;

import com.ocom.common.constant.PayConfigUrl;
import com.ocom.common.constant.WxServiceUrl;
import com.ocom.common.entity.card.EntityXfMerchPayInfo;
import com.ocom.common.entity.card.EntityXfSignNo;
import com.ocom.common.entity.payconfig.EntityXfSignOrder;
import com.ocom.common.request.payconfig.GetDishesInfoDetailListRequest;
import com.ocom.common.request.payconfig.GetTollPointInfoRequest;
import com.ocom.common.request.payconfig.MealPlanInfoRequest;
import com.ocom.common.request.payconfig.mealorder.GetOrderPlanDishesRequest;
import com.ocom.common.request.ugcapi.order.LoadRestaurantsRequest;
import com.ocom.common.request.videocall.request.SaveAccreditRequest;
import com.ocom.common.request.videocall.request.SelectVideocallGroupRequest;
import com.ocom.common.request.web.ConsTimeConfigOnShowRequest;
import com.ocom.common.resp.Result;
import com.ocom.common.utils.ResultUtil;
import com.ocom.common.vo.payconfig.kitchenprinter.PlanKitchenPrinterRequest;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;


@FeignClient(value = "payconfig")
public interface PayConfigClientService {

//    @PostMapping(PayConfigUrl.URLP_PayConfig_MerchPageOne)
//    Result MerchPageOne(@RequestParam("companyId")Long companyId,@RequestParam("parentMerchId")Long parentMerchId,@RequestParam("merchId")Long merchId);


    @PostMapping(PayConfigUrl.URLP_PayConfig_MerchPageInfo)
    public Result MerchPageInfo(@RequestParam("companyId")Long companyId,@RequestParam("merchId") Integer merchId);

    @PostMapping(PayConfigUrl.Url_getSignList)
    public Result list(@RequestParam("comId") Long comId,@RequestParam("payWay")Integer payWay);

    //生成签约申请单
    @PostMapping(PayConfigUrl.Url_addPaySign)
    public Result addPaySign(@RequestBody EntityXfSignOrder entityXfSignOrder);

    //签约回调
    @PostMapping(PayConfigUrl.Url_updatePaySign)
    public Result updatePaySign(@RequestBody EntityXfSignOrder entityXfSignOrder);

    //获取一跳代扣信息
    @PostMapping(PayConfigUrl.Url_getPaySign)
    public Result getPaySign(@RequestParam("outOrderNo") String outOrderNo);


    //获取一跳代扣信息
    @PostMapping(PayConfigUrl.Url_getUserSign)
    public Result getUserSign(@RequestParam("comId")Long comId, @RequestParam("pId")Long pId);

    @PostMapping(PayConfigUrl.Url_getUserPayWay)
    public Result getUserPayWay(@RequestParam("comId")Long comId,@RequestParam("pId") Long pId,
                                @RequestParam("merchId") Integer merchId ,
                                @RequestParam("payWay")Integer payWay);

    @PostMapping(PayConfigUrl.Url_getPayInfo)
    public Result getPayInfo(@RequestBody EntityXfMerchPayInfo entityXfMerchPayInfo);


    /**
     * 设置白名单
     * */
    @PostMapping(PayConfigUrl.Url_SetXFWhiteInfo)
    public Result setXFWhiteInfo(@RequestParam("comId")Long comId,@RequestParam("pId")Long pId,@RequestParam("state")Long state);


    /**
     * 公众号权限
     * @param companyId
     * @return
     */
    @PostMapping(PayConfigUrl.Url_getAppConfig)
    public Result getConfig(@RequestParam("companyId")Long companyId);

//    //初始化账号(addXFAccount)
//    @PostMapping(PayConfigUrl.Url_AddXFAccount)
//    public Result AddXFAccount(@RequestBody EntityXfAccountInfo entityXfAccountIn);


    @PostMapping(PayConfigUrl.URLP_getWxInfo)
    public Result getWxInfo(@RequestParam("comId") Long comId ,
                            @RequestParam("merchId")  Long merchId,
                            @RequestParam("appName") String appName);


    @PostMapping(PayConfigUrl.Url_addUserSign)
    public Result addUserSign(@RequestBody EntityXfSignNo entityXfSignNo);

    @PostMapping(PayConfigUrl.Url_delUserSign)
    public Result delUserSign(@RequestBody EntityXfSignNo entityXfSignNo);

    @PostMapping(PayConfigUrl.Url_getUserSignInfo)
    public Result getUserSignInfo(@RequestParam("comId")Long comId,
                                  @RequestParam("pId")Long pId,
                                  @RequestParam("merchId")Integer merchId,
                                  @RequestParam("payWay")Integer payWay,
                                  @RequestParam("status")Integer status);

    @PostMapping(PayConfigUrl.Url_restaurantList)
    public Result restaurantList(@RequestBody LoadRestaurantsRequest request);

    @PostMapping(PayConfigUrl.Url_getOrderPlanDishes)
    public Result getOrderPlanDishes(@RequestBody GetOrderPlanDishesRequest request);

    @PostMapping(PayConfigUrl.Url_dishesClassOfCom)
    public Result dishesClassOfCom(@RequestParam("comId") Long comId);

    @PostMapping(PayConfigUrl.Url_getTollPointInfo)
    Result getTollPointInfo(@RequestBody GetTollPointInfoRequest request);

    @PostMapping(PayConfigUrl.Url_getRechargePayWay)
    public Result getRechargePayWay(@RequestParam("companyId")Long companyId,@RequestParam("merchId") Long merchId);

    //2.2.获取餐段时间信息(getMealTimeInfo)
    @PostMapping(PayConfigUrl.URLP_PayConfig_GetMealTimeInfo)
    Result GetMealTimeInfo(@RequestBody ConsTimeConfigOnShowRequest request);

    @GetMapping(PayConfigUrl.URLP_PayConfig_GetMealNameInfo)
    Result getMealNameInfo(@RequestParam("comId") Long comId,@RequestParam("mealNo") String mealNo);

    @PostMapping(PayConfigUrl.Url_getDishesInfoDetailList)
    public Result findByComIdAndDishesId(@RequestBody GetDishesInfoDetailListRequest request);

    //11.3.9排餐计划详情（mealPlanInfo）
    @PostMapping(PayConfigUrl.Url_mealPlanInfo)
    public Result mealPlanInfo(@RequestBody MealPlanInfoRequest request) ;

    @PostMapping(PayConfigUrl.Url_planKitchenPrinter)
    public Result planKitchenPrinter(@RequestBody PlanKitchenPrinterRequest object);


    @PostMapping(PayConfigUrl.URL_selectVideocallGroup)
    public Result selectVideocallGroup(@RequestBody SelectVideocallGroupRequest request);

    @PostMapping(PayConfigUrl.URL_saveAccredit)
    public Result saveAccredit(@RequestBody SaveAccreditRequest request);


    @PostMapping(PayConfigUrl.URL_findByFeeDataId)
    public Result findByFeeDataId(@RequestParam("comId") Long comId, @RequestParam("dataId") Integer dataId);


    @PostMapping(PayConfigUrl.Url_getSubAccountList)
    public Result getSubAccountList(@RequestParam(value = "comId") Integer comId);
}
